+2009-01-23 Matthias Clasen <mclasen@redhat.com>
+
+ Bug 567124 – proposal to delay doing something related to
+ immodule until widgets realized
+
+ Delay setting up immodules until the widget is realized.
+ Patch by Akira Tagoh
+
+ * gtk/gtktextview.c: Don't set up im stuff if the widget
+ is not realized.
+
+ * gtk/gtkimmodule.c: Assert that we have a window.
+
2009-01-23 Matthias Clasen <mclasen@redhat.com>
Skip Desktop if it equals the home folder
GdkScreen *screen;
GtkSettings *settings;
+ /* assertion to make sure all of the unexpected invocation is really gone. */
+ g_return_val_if_fail (client_window != NULL, SIMPLE_ID);
+
if (!contexts_hash)
gtk_im_module_initialize ();
/* Check if the certain immodule is set in XSETTINGS.
*/
- if (client_window != NULL && GDK_IS_DRAWABLE (client_window))
+ if (GDK_IS_DRAWABLE (client_window))
{
screen = gdk_drawable_get_screen (GDK_DRAWABLE (client_window));
if (screen)
*/
area.width = 0;
- gtk_im_context_set_cursor_location (text_view->im_context, &area);
+ if (GTK_WIDGET_REALIZED (text_view))
+ gtk_im_context_set_cursor_location (text_view->im_context, &area);
}
static gboolean
tmp_list = tmp_list->next;
}
+
+ /* Ensure updating the spot location. */
+ gtk_text_view_update_im_spot_location(text_view);
}
static void